package com.rem.cloudalibaba.service.impl;

import com.rem.cloudalibaba.entity.Product;
import com.rem.cloudalibaba.mapper.ProductMapper;
import com.rem.cloudalibaba.service.ProductService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author Rem
 * @date 2021/7/13
 */
@Service
public class ProductServiceImpl implements ProductService {

    @Autowired
    ProductMapper productMapper;


    /**
     * 根据id查询商品
     *
     * @param pid
     * @return
     */
    @Override
    public Product findBuyId(Integer pid) {
        return productMapper.selectById(pid);
    }
}
